From: Tim Deegan Date: Fri, 20 May 2011 07:52:22 +0000 (+0100) Subject: pci_remove_device: fix linked list discipline X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~10345 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=70f30bb4374d05b574dc79b5d0d6299d2050e351;p=xen.git pci_remove_device: fix linked list discipline Signed-off-by: Tim Deegan --- diff --git a/xen/drivers/passthrough/pci.c b/xen/drivers/passthrough/pci.c index e30cd950a3..1cd82d632f 100644 --- a/xen/drivers/passthrough/pci.c +++ b/xen/drivers/passthrough/pci.c @@ -173,11 +173,11 @@ out: int pci_remove_device(u8 bus, u8 devfn) { - struct pci_dev *pdev; + struct pci_dev *pdev, *tmp; int ret = -ENODEV; spin_lock(&pcidevs_lock); - list_for_each_entry ( pdev, &alldevs_list, alldevs_list ) + list_for_each_entry_safe ( pdev, tmp, &alldevs_list, alldevs_list ) if ( pdev->bus == bus && pdev->devfn == devfn ) { ret = iommu_remove_device(pdev);